home *** CD-ROM | disk | FTP | other *** search
/ Network Supervisor's Toolkit / Network Supervisor's Toolkit.iso / tools / lu62 / setrc.c < prev    next >
C/C++ Source or Header  |  1996-07-10  |  1KB  |  37 lines

  1.  /********************************************************
  2.  *                                                       *
  3.  *   This subroutine sets the appropriate return         *
  4.  *   code if conversation is ether in END or abnormal    *
  5.  *   state.                                              *
  6.  *                                                       *
  7.  *   Input : ptr - pointer to the control record,        *
  8.  *           p_rcb - pointer to RCB                      *
  9.  *   Output: prim_rc & sec_rc fields in control          *
  10.  *           record.                                     *
  11.  *                                                       *
  12.  * CopyRight 1995. Nicholas Poljakov all rights reserved.*
  13.  *                                                       *
  14.  ********************************************************/
  15. #include <rcb.h>
  16. #include <common.h>
  17. #include <state1.h>
  18.  
  19. setrc(ptr, p_rcb)
  20. struct com *ptr;
  21. struct rcb *p_rcb;
  22. {
  23.    if (p_rcb -> sense == 0x08640000) {
  24.       ptr -> prim_rc = deallocate_abend_prog;
  25.       return (0);
  26.    }
  27.    if (p_rcb -> sense == 0x08640001) {
  28.       ptr -> prim_rc = deallocate_abend_svc;
  29.       return (0);
  30.    }
  31.    if (p_rcb -> sense == 0x08640002) {
  32.       ptr -> prim_rc = deallocate_abend_timer;
  33.       return (0);
  34.    }
  35.    return (0);
  36. }
  37.